package com.matrix.java.chap_03;

import java.util.Scanner;

/*
    计算三角形的周长
 */
public class Ex3_19 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("a: ");
        double a = input.nextDouble();
        System.out.print("b: ");
        double b = input.nextDouble();
        System.out.print("c: ");
        double c = input.nextDouble();
        if (a + b > c ^ a + c > b ^ b + c > a) {
            System.out.println(a + b + c);
        } else {
            System.out.println("illegal");
        }
    }
}
